Skip to content

chore(ai-clis): order after uv-providing features - #76

Merged
pofallon merged 2 commits into
mainfrom
chore/ai-clis-uv-ordering
Jul 31, 2026
Merged

chore(ai-clis): order after uv-providing features#76
pofallon merged 2 commits into
mainfrom
chore/ai-clis-uv-ordering

Conversation

@pofallon

Copy link
Copy Markdown
Contributor

Context

specifyCli installs via uv, and install.sh:130-142 self-provisions uv when it's absent (command -v uv~/.local/bin/uv → Astral installer). So the feature works standalone — this is not a missing dependency.

The gap is ordering. This repo's python-tools feature also installs uv to /usr/local/bin/uv, and nothing sequenced the two. If ai-clis happened to run first, it ran the Astral installer, and python-tools then overwrote that uv. No breakage, but a duplicated download and a nondeterministic build.

Why installsAfter and not dependsOn

Per the Features spec, dependsOn is a hard dependency: the resolver auto-installs it recursively and fails the whole container build if it can't be satisfied. Neither dependsOn nor installsAfter can be conditioned on option values.

Since specifyCli is one of ten optional installs, dependsOn would force uv into every container using ai-clis — including ones passing omit: "specifyCli" or install: "claudeCode" that never touch Python. installsAfter only reorders features the user already selected and is inert otherwise, which matches the real relationship.

Change

"installsAfter": [
  "ghcr.io/devcontainers/features/node",
  "ghcr.io/get2knowio/devcontainer-features/python-tools",
  "ghcr.io/va-h/devcontainers-features/uv",
  "ghcr.io/jsburckhardt/devcontainer-features/uv",
  "ghcr.io/gvatsal60/dev-container-features/uv"
]

The three community uv features are the ones listed on containers.dev; va-h is additionally confirmed against GHCR (the repo has src/uv and the registry issues a pull token for it). Unused entries are no-ops, so listing all three only helps.

Also documented the uv relationship in the README.

Risk

Metadata and docs only — no install logic changed.

🤖 Generated with Claude Code

pofallon and others added 2 commits July 31, 2026 11:57
specifyCli installs via uv, and install.sh self-provisions uv when it is
absent. Nothing ordered that against features that also install uv, so
ai-clis could run first, run the Astral installer, and then have its uv
overwritten by python-tools moments later — wasted work and a
nondeterministic build.

installsAfter is the right knob rather than dependsOn: dependsOn is a hard,
auto-installing dependency and cannot be conditioned on option values, so it
would force uv into every container using this feature, including the ones
that omit specifyCli. installsAfter only reorders features the user already
selected and is inert otherwise.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
devcontainers/action@v1 defaults base-path-to-features to '', so validate-only
scandirs an empty path and dies with ENOENT before reading any metadata.
release.yaml already passes ./src; validate.yml never did.

This workflow only triggers on src/**/devcontainer-feature.json, and no PR had
touched one since early June, so the breakage went unnoticed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@pofallon
pofallon merged commit 1427726 into main Jul 31, 2026
16 checks passed
@pofallon
pofallon deleted the chore/ai-clis-uv-ordering branch July 31, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant